home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17573 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.iastate.edu!news
  2. From: raschmit@iastate.edu
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Re: Please help: Borland C compiler on DOS memory allocation problem
  5. Date: 16 Apr 1996 15:46:18 GMT
  6. Organization: Iowa State University, Ames, Iowa
  7. Message-ID: <4l0fca$pnl@news.iastate.edu>
  8. References: <4kuhfh$k53@k9.San-Jose.ate.slb.com>
  9. NNTP-Posting-Host: schmitz.aecl.iastate.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
  14.  
  15. I may have a memory problem that is very similar to the original post...
  16. how does one gain access to extended/expanded memory on a PC. I'm writing 
  17. a 16-bit DOS program using the Borland C++ 4.0 compiler.  
  18.  
  19. I have been writing code that is able initialize arrays using heap memory 
  20. as well as dynamically allocate memory from the heap using malloc(), 
  21. farmalloc(), calloc(), new(), etc. for quite some time.  From what I can 
  22. tell, this is entirely allocated from the 640 Kbytes of conventional 
  23. memory.  However, I'd like to use an array (of structs) that far exceeds 
  24. the capacity of conventional memory (1.2 meg approx.) and I just can't 
  25. seem to figure out how to put it into either extended or expanded memory 
  26. (I have 8 megs on my Pentium PC).  I am compiling the program using the 
  27. huge memory model....the program compiles and links properly but crashes 
  28. when the amount of data exceeds the 640 Kbytes of conventional memory.
  29.  
  30. Would anyone happen to know how I can resolve this problem?
  31.  
  32. My questions are identical to the questions in the original post by 
  33. afzal@San-Jose.ate.slb.com(Afzal Hossain):
  34.  
  35. 1. Is the program (requiring 12 MB heap) feasible on a DOS based PC?
  36. 2. What are my choices -
  37.  
  38.  
  39.  
  40.  
  41.